bitkeeper revision 1.1159.1.326 (418677bearNwfvI3AaLxMG1OKQfO9A)
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Mon, 1 Nov 2004 17:51:58 +0000 (17:51 +0000)
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Mon, 1 Nov 2004 17:51:58 +0000 (17:51 +0000)
Better do_softirq(). We know that there is at least one softirq pending
on entry, so we cget rid of the initial test for zero.

xen/common/softirq.c

index 166a8163c1f03de402593d60ac32d8bdaee6eecf..7c7e6cc636b4ae36bce681ce6127601c473a1600 100644 (file)
@@ -23,12 +23,14 @@ asmlinkage void do_softirq()
 {
     unsigned int i, pending, cpu = smp_processor_id();
 
-    while ( (pending = softirq_pending(cpu)) != 0 )
-    {
+    pending = softirq_pending(cpu);
+    ASSERT(pending != 0);
+
+    do {
         i = find_first_set_bit(pending);
         clear_bit(i, &softirq_pending(cpu));
         (*softirq_handlers[i])();
-    }
+    } while ( (pending = softirq_pending(cpu)) != 0 );
 }
 
 void open_softirq(int nr, softirq_handler handler)